package com.woniuxy.platform.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import result.Result;
import java.io.IOException;
import java.util.List;

@FeignClient(contextId = "roleClient", name = "platform" ,path = "/platform")
public interface RoleClient {

    @PostMapping({"/roleResource"})
    Result addRoleResource(@RequestParam("roleId") Integer roleId, @RequestParam("resourcesId") Integer resourcesId) throws IOException;

    @DeleteMapping({"/roleResource"})
    Result delRoleResource(@RequestParam("roleResourceId") Integer roleResourceId);

    @GetMapping({"/roleResource"})
    Result<List<String>> checkRoleResource(@RequestParam("roleId") Integer roleId);


}
